package com.dbsop.domain.rest.info;

/**
 * 区间范围取值
 */
public class RFFM {

    private Double start;

    private Double end;

    private String format;

    private boolean includeLower = true;

    private boolean isIncludeLower = true;

    public RFFM(Double start, Double end) {
        this.start = start;
        this.end = end;
        check();
    }

    public RFFM(Double start, Double end, String format) {
        this.start = start;
        this.end = end;
        this.format = format;
        check();
    }

    public RFFM setCludeLower(Boolean includeLower, Boolean isIncludeLower){
        this.includeLower = includeLower;
        this.isIncludeLower = isIncludeLower;
        return this;
    }

    private void check() {
        if (start == null || end == null) {
            throw new RuntimeException(" RFFM :  区间范围 不能都为空");
        }
    }

    public Double getStart() {
        return start;
    }

    public Double getEnd() {
        return end;
    }

    public String getFormat() {
        return format;
    }

    public boolean isIncludeLower() {
        return includeLower;
    }
}